<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "{{%exchange_item}}".
 *
 * @property integer $id
 * @property string $title
 * @property integer $price
 * @property integer $type
 * @property integer $cate_id
 * @property string $desc
 * @property integer $num
 * @property string $img
 * @property integer $create_time
 * @property integer $flag
 */
class ExchangeItem extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%exchange_item}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['price', 'type', 'cate_id', 'num', 'create_time', 'flag'], 'integer'],
            [['desc'], 'string'],
            [['title', 'img'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'title' => 'Title',
            'price' => 'Price',
            'type' => 'Type',
            'cate_id' => 'Cate ID',
            'desc' => 'Desc',
            'num' => 'Num',
            'img' => 'Img',
            'create_time' => 'Create Time',
            'flag' => 'Flag',
        ];
    }
}
